package com.cskaoyan.javase.oop2.encapsulate._1extends._6protected._1two;

import com.cskaoyan.javase.oop2.encapsulate._1extends._6protected._0one.CurrentClazz;
import com.cskaoyan.javase.oop2.encapsulate._1extends._6protected._0one.SamePackageSonClazz;

/**
 * 不同包下的非子类
 * 是无法访问到父类中的num的
 *
 * 如果是不同包下的非子类,是一定无法访问其他类的受保护成员的
 *
 * @since 09:58
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class AnotherPackageClazz {
    public static void main(String[] args) {
        CurrentClazz cc = new CurrentClazz();
        // 'num' has protected access in 'com.cskaoyan.javase.oop2.encapsulate._1extends._6protected._0one.CurrentClazz'. ';' expected.
        // cc.num

        SamePackageSonClazz sc = new SamePackageSonClazz();
        // sc.num
    }
}
